using System.Data.SqlClient;
using System.Configuration;
public class DataAccess
{

    private SqlConnection connection = 
        new SqlConnection(ConfigurationManager.ConnectionStrings["AppConnectionString"].ConnectionString);

    public SqlConnection Connection
    {
        get { return connection; }
        set { connection = value; }
    }

    public DataAccess() {}

    public void ConnectToDatabase()
    {
        try{
            connection.Open();
        }catch (System.Exception e){
	
        }
    }
    public void CloseDatabase()
    {
        connection.Close();
    }
}

